package com.jl.book.ui.home

import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseProviderMultiAdapter
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.jl.book.R
import com.jl.book.bean.MyContacts

class SlideAdapter : BaseProviderMultiAdapter<MyContacts>() {

    override fun getItemType(data: List<MyContacts>, position: Int): Int {
        return data[position].type
    }

    fun getLetterPosition(letter:String):Int{
        for (i in data.indices){
            if (data[i].letter == letter) {
                return i
            }
        }
        return -1
    }
}